<?php

namespace App\Http\Common\Contexts;

class SwooleDemonContext
{

    /**
     * 所有子索引与携程id映射，子携程不存在时为null
     * @var array
     */
    protected static $_workers_idx_cid = [];


    static function setWorkersIdxCid($task_name, $idx, $cid)
    {
        self::$_workers_idx_cid[$task_name][$idx] = $cid;
    }


    static function getWorkersIdxCid()
    {
        return self::$_workers_idx_cid;
    }

}
